package String;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 洪汤泽大帅哥
 * Date: 2024-11-10
 * Time: 10:47
 */
public class demo1 {
    public static void main(String[] args) {
        String str1 = new String("abcd");
        String str2 = "hello";
        char[] chars = {'w','o','r','l','d'};
        String str3 = new String(chars);

        System.out.println(str1);
        System.out.println(str2);
        System.out.println(str3);

        byte[] bytes = {97,98,99,100};
        String str4 = new String(bytes);
        System.out.println(str4);
    }
}
